﻿using Jint;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using T.FAS.Runtime.Base.Entity;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using T.FAS.Runtime.Expression.Entity;
using T.FAS.Runtime.Expression.Service;
using System.Dynamic;
using System.Security.Principal;

namespace T.FAS.Runtime.Expression.UnitTest
{
    [TestClass]
    public class AFUnit
    {
        Dictionary<string, object> dic = new Dictionary<string, object>();
        
        [TestMethod]
        public void Test()
        {
            var exprService = ExprService.GetInstance;
            Dictionary<string, object> par = new Dictionary<string, object>();
            string jsScript = $@"return AF.Participant.Sys.GetUsers('123');";
            var result = exprService.JSExecute(jsScript, par);
            Console.WriteLine(result.State);
            Assert.IsTrue(result.State == ResultState.Success);
        }
    }
}
